package net.adetech.cjg.innerservice.mapper;

import net.adetech.cjg.innerservice.entity.Yxzl;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

@Mapper
public interface YxzlDao {

    @Select("select * from cjg_yxzl where uuid = #{uuid}")
    Yxzl getYxzlByUuid(String uuid);


    @Insert("insert into cjg_yxzl(id,lsbz,scbz,scry,scsj,tp,uuid,zllb,sfzmhm) values (seq_yxzl_id.nextval,'1','0',#{scry},sysdate,#{tp,jdbcType=CLOB},#{uuid},#{zllb},#{sfzmhm})")
    void addNewYxzl(Yxzl yxzl);

    @Update("update cjg_yxzl set lsbz = '0',sxh = #{sxh},lsh = #{lsh} where uuid = #{uuid}")
    void confirmAddYxzl(Yxzl yxzl);
}
